/**
 * 
 */
package com.my.control;

import java.io.ByteArrayInputStream;

import com.my.util.CreateImage;

/**
 * @author Administrator
 * 
 */
public class SecurityCodeImageAction extends BaseAction {
	// 图片流
	private ByteArrayInputStream imageStream;

	public ByteArrayInputStream getImageStream() {
		return imageStream;
	}

	public void setImageStream(ByteArrayInputStream imageStream) {
		this.imageStream = imageStream;
	}

	public String execute() throws Exception {
		String securityCode = CreateImage.getSecurityCode();
		session.put("securityCode", securityCode);
		imageStream = CreateImage.getImageAsInputStream(securityCode);
		return "success";
	}
}
